package tables

const (
	ClusterTypeForPrivate = 1 // 私有集群
	ClusterTypeForPreempt = 2 // 抢占
	ClusterTypeForShare   = 3 // 共享
)

type CapCluster struct {
	Id              int64   `json:"id,string" gorm:"primaryKey"`
	Name            string  `json:"name"`
	CpuThreshold    float64 `json:"cpuThreshold"`
	MemoryThreshold float64 `json:"memoryThreshold"`
	MaxSessionTime  int     `json:"maxSessionTime"`
	SessionOutTime  int     `json:"sessionOutTime"`
	TimeOutAction   int     `json:"timeOutAction"` // 1-注销会话 ，2-断开会话
	ClusterType     int     `json:"clusterType"`   // 集群类型：私有、抢占、共享
	Creator         string  `json:"creator"`
	CreatorId       int64   `json:"creatorId,string" `
	CreatedAt       int64   `json:"createdAt,string" gorm:"autoCreateTime"`
}

func (r *CapCluster) TableName() string {
	return "cap_clusters"
}
